package com.minimalist.common.entity.basic.vo.storage;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "存储信息查询实体")
public class StorageQueryVO extends PageReq implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "storageName", description = "存储名称", type = "string")
    private String storageName;

    @Schema(name = "storageType", description = "存储类型", type = "string")
    private String storageType;

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "存储状态", type = "integer")
    private Integer status;

    public String getStorageName() {
        return storageName;
    }

    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }

    public String getStorageType() {
        return storageType;
    }

    public void setStorageType(String storageType) {
        this.storageType = storageType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        StorageQueryVO that = (StorageQueryVO) o;
        return Objects.equals(storageName, that.storageName) &&
               Objects.equals(storageType, that.storageType) &&
               Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), storageName, storageType, status);
    }

    @Override
    public String toString() {
        return "StorageQueryVO{" +
               "storageName='" + storageName + '\'' +
               ", storageType='" + storageType + '\'' +
               ", status=" + status +
               "} " + super.toString();
    }
}
